package com.app.simpsonux;

import android.os.Parcel;
import android.os.Parcelable;

public class UXParcel implements Parcelable
{
    public String mUserId     = null;
    public String mCalleeId   = null;
    public String mUserPwd    = null;
    public String mServerAddr = null;
    public int    mServerPort = 0;
    
    public static final Parcelable.Creator<UXParcel> CREATOR = new Parcelable.Creator<UXParcel>()
    {
        @Override
        public UXParcel createFromParcel(Parcel in)
        {
            return new UXParcel(in);
        }

        public UXParcel[] newArray(int size) {
            return new UXParcel[size];
        }
    };

    public UXParcel()
    {
        mUserId     = "simpson";
        mCalleeId   = "0000";
        mUserPwd    = "0000";
        mServerAddr = "0.0.0.0";
        mServerPort = 5060;
    }

    public UXParcel(Parcel in)
    {
        mUserId     = in.readString();
        mCalleeId   = in.readString();
        mUserPwd    = in.readString();
        mServerAddr = in.readString();
        mServerPort = in.readInt();
    }

    public int describeContents()
    {
        // TODO Auto-generated method stub
        return 0;
    }

    public void writeToParcel(android.os.Parcel out, int arg1)
    {
        // TODO Auto-generated method stub
        out.writeString( mUserId     );
        out.writeString( mCalleeId   );
        out.writeString( mUserPwd    );
        out.writeString( mServerAddr );
        out.writeInt(    mServerPort );
    }
}
